<!DOCTYPE html>
<html  style="width: 100%;height: 100%">
<head>
    <meta charset="utf-8">
    <title>威利邀请童心未泯的你一起登陆</title>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="full-screen" content="yes"/>
    <meta name="screen-orientation" content="portrait"/>
    <meta name="viewport" content="target-densitydpi=high-dpi,width=device-width"/>
    <meta name="x5-fullscreen" content="true"/>
    <meta http-equiv="Access-Control-Allow-Origin" content="*"/>
    <meta name="360-fullscreen" content="true"/>
    <style>
        body{
            width: 100%;
            margin: 0px;
            padding: 0px;
            height: 100%;
        }
        body, canvas, div {
            -moz-user-select: none;
            -webkit-user-select: none;
            -ms-user-select: none;
            -khtml-user-select: none;
            /*-webkit-tap-highlight-color: rgba(0, 0, 0, 0);*/
        }

    </style>

<script>
    document.ccConfig={
        "project_type": "javascript",

        "debugMode" : 1,
        "showFPS" : 0,
        "frameRate" : 60,
        "id" : "gameCanvas",
        "renderMode" : 1,
        "engineDir":"frameworks/cocos2d-html5",

        "modules" : ["core", "actions", "menus","progress-timer"],

        "jsList" : [
            "src/resources.js?111",
            "src/layerss.js"
        ]
    };
    </script>

</head>

<body style="padding:0; margin: 0;background-color: #0B0F24;">
<div style="display: none;">
    <img src='res/loading.png' />
</div>
<div class="hide">
    <audio id="myAudio" src="res/bg.mp3" preload="true" loop="true" oncanplay=""></audio>
    <audio id="myAudio2" src="res/bg2.mp3" preload="true" loop="true" oncanplay=""></audio>
</div>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script src="http://cdn.bootcss.com/jquery/1.11.2/jquery.min.js"></script>

<script>


    $.get('http://apps.sinosofts.cn/rocket-landing/wx/index.php',function (data) {
        //console.log(data);
		data = JSON.parse(data);console.log(data);
			wx.config({
			// 配置信息, 即使不正确也能使用 wx.ready
			debug: false,
			appId: data.appId,
			timestamp: data.timestamp,
			nonceStr: data.nonceStr,
			signature: data.signature,
			jsApiList: [
                    'onMenuShareTimeline',
                    'onMenuShareAppMessage'
            ]
		});


        wx.ready(function() {
            var au = document.getElementById('myAudio');
            //au.volume  = 0;
            au.muted  = true;
            au.play();

            var au2 = document.getElementById('myAudio2');
            //au2.volume  = 0;
            au2.muted  = true;
            au2.play();
            //au.pause();
        });

        wx.onMenuShareTimeline({
            title: '威利邀请童心未泯的你一起登陆', // 分享标题
            link: 'http://apps.sinosofts.cn/rocket-landing/?'+Math.random(), // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
            imgUrl: 'http://apps.sinosofts.cn/rocket-landing/res/loading.png', // 分享图标
            success: function () {
                // 用户确认分享后执行的回调函数
            },
            cancel: function () {
                // 用户取消分享后执行的回调函数
            }
        });
        wx.onMenuShareAppMessage({
            title: '威利邀请童心未泯的你一起登陆', // 分享标题
            desc: '', // 分享描述
            link: 'http://apps.sinosofts.cn/rocket-landing/?'+Math.random(), // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
            imgUrl: 'http://apps.sinosofts.cn/rocket-landing/res/loading.png', // 分享图标
            type: '', // 分享类型,music、video或link，不填默认为link
            dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
            success: function () {
                // 用户确认分享后执行的回调函数
            },
            cancel: function () {
                // 用户取消分享后执行的回调函数
            }
        });
    });




    //    if(window.navigator.userAgent.indexOf("MicroMessenger") == -1){
    //        window.location.href="http://devcon.cocos.com/";
    //    }
    var musicNum = '';
    var musicStatus = 1;
    var playMusic = function (status  ,time) {

        var audio = document.getElementById("myAudio"+musicNum);


        if (status) {
            if(time)
            audio.currentTime = 0;
            audio.play();
            audio.muted = false;
			
            if (audio.paused) {

            }

        } else {
            if (!audio.paused) {
                audio.pause();
            }
        }
    }
    //playMusic(1,1);
    //musicNum = '2';
    //playMusic(1,1);
    //musicNum = '';
	
	
	function musicFadeIn(){
	
		var audio = document.getElementById("myAudio"+musicNum);
		audio.volume = 0.0;
		var k = setInterval(function(){
			audio.volume += 0.1;
			if(audio.volume >= 0.9){
				clearInterval(k);
			}
		},200);
	
	}

	function musicFadeOut(){

		var audio = document.getElementById("myAudio"+musicNum);
		audio.volume = 1;
		var k = setInterval(function(){
			audio.volume -= 0.1;
			if(audio.volume <= 0.1){
				clearInterval(k);
			}
		},200);

	}
	
</script>

<script type="text/javascript" src="cocos2d-js-v3.13.js" charset="UTF-8"></script>

<canvas id="gameCanvas" width="640" height="1000"></canvas>


<script src="main.js?222"></script>

<!--script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script-->


<div style="display:none;">
</div>

</body>
</html>
